package com.by.zhdoctor.domain;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A D_m_zhenghe_seekrecipe_stat.
 */
@Entity
@Table(name = "d_m_zhenghe_seekrecipe_stat")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class D_m_zhenghe_seekrecipe_stat implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @NotNull
    @Column(name = "stati_date", nullable = false)
    private String stati_date;

    @NotNull
    @Column(name = "month_id", nullable = false)
    private String month_id;

    @Column(name = "quest_count")
    private Integer quest_count;

    @Column(name = "answer_count")
    private Integer answer_count;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStati_date() {
        return stati_date;
    }

    public D_m_zhenghe_seekrecipe_stat stati_date(String stati_date) {
        this.stati_date = stati_date;
        return this;
    }

    public void setStati_date(String stati_date) {
        this.stati_date = stati_date;
    }

    public String getMonth_id() {
        return month_id;
    }

    public D_m_zhenghe_seekrecipe_stat month_id(String month_id) {
        this.month_id = month_id;
        return this;
    }

    public void setMonth_id(String month_id) {
        this.month_id = month_id;
    }

    public Integer getQuest_count() {
        return quest_count;
    }

    public D_m_zhenghe_seekrecipe_stat quest_count(Integer quest_count) {
        this.quest_count = quest_count;
        return this;
    }

    public void setQuest_count(Integer quest_count) {
        this.quest_count = quest_count;
    }

    public Integer getAnswer_count() {
        return answer_count;
    }

    public D_m_zhenghe_seekrecipe_stat answer_count(Integer answer_count) {
        this.answer_count = answer_count;
        return this;
    }

    public void setAnswer_count(Integer answer_count) {
        this.answer_count = answer_count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        D_m_zhenghe_seekrecipe_stat d_m_zhenghe_seekrecipe_stat = (D_m_zhenghe_seekrecipe_stat) o;
        if (d_m_zhenghe_seekrecipe_stat.id == null || id == null) {
            return false;
        }
        return Objects.equals(id, d_m_zhenghe_seekrecipe_stat.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "D_m_zhenghe_seekrecipe_stat{" +
            "id=" + id +
            ", stati_date='" + stati_date + "'" +
            ", month_id='" + month_id + "'" +
            ", quest_count='" + quest_count + "'" +
            ", answer_count='" + answer_count + "'" +
            '}';
    }
}
